Create a Web API definition

Web API definitions contain all the data required to instruct Blue Prism how to make HTTP requests to a Web API. The data in the API definition determines how each request is constructed, specifying the required URL, HTTP method, headers, and authentication required to make a request. API definitions also allow parameters to be defined that can be used to pass data into a request.

Each API definition is made up of the following elements:

  • Basic settings – The name, base URL, and timeout settings used for all API requests configured in the API definition.
  • Actions – The capabilities provided by the Web API that will be made available to Blue Prism. The actions define the request body and response handling for each API request in the definition.
  • Headers – The headers that will be used in the requests for this API definition. Common headers are used in all requests, and action-specific headers are used, in addition to any common headers, for the actions in which they are defined.
  • Parameters – Dynamically expanding references that are used to pass data into base URLs, URL paths, headers, and request bodies. Parameters can also be used in the Subject field for OAuth 2.0 (JWT Bearer Token) configurations. Common parameters can be used in any action, action-specific parameters can only be used in the action in which they are defined.
  • Common authentication – How each request to an API is authenticated.
  • Common code – Code used to create complex API requests and responses.

The Web API Action stage expects a successful response from the API request. Any unsuccessful requests will throw an exception which should be handled accordingly. For more information, see Error handling.

Web API definitions are configured in the System settings of the Blue Prism interactive client.

  1. Select the System tab.
  2. Select Objects > Web API Services from the navigation tree.
  3. Click Add Service from the options menu.

    The New Web API Service dialog displays.